/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package com.opgea.token.domain.model;

import java.util.Date;

import com.opgea.token.domain.qualifiers.TokenStatusQualifier;

/**
 * 
 * @author Ramesh
 */
public class TokenStatus implements Comparable<TokenStatus> {

    private Long companyId;
    private Long tokenId;
    private Integer tokenNo;
    private String personName;
    private String mobileNo;
    private Long destinationId;
    private String destinationName;
    private Integer tokenStatus;
    private Date appointmentDate;
    private String statusCSS;

    public TokenStatus() {
    }

    public Long getCompanyId() {
	return companyId;
    }

    public void setCompanyId(Long companyId) {
	this.companyId = companyId;
    }

    public Long getDestinationId() {
	return destinationId;
    }

    public void setDestinationId(Long destinationId) {
	this.destinationId = destinationId;
    }

    public String getDestinationName() {
	return destinationName;
    }

    public void setDestinationName(String destinationName) {
	this.destinationName = destinationName;
    }

    public String getMobileNo() {
	return mobileNo;
    }

    public void setMobileNo(String mobileNo) {
	this.mobileNo = mobileNo;
    }

    public String getPersonName() {
	return personName;
    }

    public void setPersonName(String personName) {
	this.personName = personName;
    }

    public Long getTokenId() {
	return tokenId;
    }

    public void setTokenId(Long tokenId) {
	this.tokenId = tokenId;
    }

    public Integer getTokenNo() {
	return tokenNo;
    }

    public void setTokenNo(Integer tokenNo) {
	this.tokenNo = tokenNo;
    }

    public Integer getTokenStatus() {
	return tokenStatus;
    }

    public void setTokenStatus(Integer tokenStatus) {
	this.tokenStatus = tokenStatus;
    }

    public Date getAppointmentDate() {
	return appointmentDate;
    }

    public void setAppointmentDate(Date appointmentDate) {
	this.appointmentDate = appointmentDate;
    }

    public String getStatusCSS() {
	statusCSS = "STATUS_"
		+ TokenStatusQualifier.values()[this.tokenStatus].name();
	return statusCSS;
    }

    public void setStatusCSS(String statusCSS) {
	this.statusCSS = statusCSS;
    }

    @Override
    public String toString() {
	return "TokenStatus{" + "companyId=" + companyId + ", tokenId="
		+ tokenId + ", tokenNo=" + tokenNo + ", personName="
		+ personName + ", mobileNo=" + mobileNo + ", destinationId="
		+ destinationId + ", destinationName=" + destinationName
		+ ", tokenStatus=" + tokenStatus + ", appointmentDate="
		+ appointmentDate + '}';
    }

    @Override
    public int compareTo(TokenStatus tokenStatus) {
	if (this.tokenNo < tokenStatus.tokenNo) {
	    return -1;
	} else {
	    return 0;
	}
    }

}
